﻿using DapperExtensions.Mapper;
using MHI.DeviceManager.Interfaces;
using System;
using System.Collections.Generic;

namespace MHI.DeviceManager.Data
{
    public class DevDeviceTMapper : ClassMapper<DevDeviceT>
    {
        public DevDeviceTMapper()
        {
            Table("dev_device_t");
            Map(f => f.Id).Column("id").Key(KeyType.Assigned);
            Map(f => f.Name).Column("name");
            Map(f => f.Code).Column("code");
            Map(f => f.DeviceType).Column("device_type");
            Map(f => f.Location).Column("location");
            Map(f => f.LocationPoint).Column("locationPoint");
            Map(f => f.ProductionDate).Column("production_date");
            Map(f => f.UseDate).Column("use_date");
            Map(f => f.ServiceLife).Column("service_life");
            Map(f => f.ProductionFactory).Column("production_factory");
            Map(f => f.FactoryNumber).Column("factory_number");
            Map(f => f.Status).Column("");
            Map(f => f.TechnicalParas).Column("technical_paras");
            Map(f => f.Price).Column("price");
            Map(f => f.QrCode).Column("qr_code");
            Map(f => f.Remark).Column("remark");
            Map(f => f.GmtCreated).Column("gmt_created");
            Map(f => f.PersonModified).Column("person_modified");
            Map(f => f.GmtModified).Column("gmt_modified");
            Map(f => f.StateInfo).Column("state_info");
            Map(f => f.IsUse).Column("is_use");
            Map(f => f.Version).Column("version");

        }
    }
}